<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>日期控件 - Xui Demo</title>
	<!-- demo data -->
	<link rel="stylesheet" type="text/css" href="../demo.css">
	
	<!-- xui -->
	<link rel="stylesheet" type="text/css" href="../../xui.css">
	<script type="text/javascript" src="../../jquery.min.js"></script>
	<script type="text/javascript" src="../../xui.js"></script>
	
	<!-- xdate -->
	<script type="text/javascript">
		$(function(){
			var date = $("#xdate").xdate({
				time:false,				//是否显示时间
				minDate:'2016-06-15'	//最小日期
				//maxDate:'2016-06-30'	//最大日期
			});			
			$(".getVal").xbtn(function(){
				$.xalert({title:'选中日期',msg:date.val()});
			});
			$(".setVal").xbtn(function(){
				date.val('2018-08-08 08:08:08');
			});		
		})
	</script>
</head>
<body>
	<h2>日期控件</h2>
	<input class="xinput xdate" id="xdate"/>
	<span class="xbtn getVal">获取选中日期</span>
	<span class="xbtn setVal">设置日期</span>
</body>
</html>